
import rubiksClass
from random import randrange
import time
# bytecode options: lowercase for clockwise, uppercase for counterclockwise
# 
# u U = up
# f F = front
# r R = right
# b B = back
# l L = left
# d D = down

opTypes = ['u','f','r','b','l','d','U','F','R','B','L','D']

cube = rubiksClass.Cube()

number = 1000000

print "Generating %d operations:" %number

ops = ''
for i in xrange(number):
	ops += opTypes[randrange(len(opTypes))]


print "Starting operations:"

starttime = time.time()

for op in ops:
    cube.operate(op)

cube.save('fin')
cube.pprint()

print "calculated in", time.time() - starttime,  "seconds"
